package com.anycl.design.creation.prototype;

public class Address implements Cloneable {
    private Code code;

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Address address = (Address) super.clone();
        address.code = (Code) code.clone();
        return address;
    }

    public Code getCode() {
        return code;
    }

    public void setCode(Code code) {
        this.code = code;
    }

    public Address(Code code) {
        this.code = code;
    }
}
